package com.xhs.modular.user.controller;

import com.xhs.core.message.ReturnResult;
import com.xhs.modular.user.param.UserPageParam;
import com.xhs.modular.user.service.SysUserService;
import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @desc: 系统用户表 控制层。
 * @projectName: spring-boot3-demo
 * @author: xhs
 * @date: 2025-06-09 周一 15:17
 */
@RestController
@RequestMapping("/sysUser")
public class SysUserController {

    @Resource
    private SysUserService sysUserService;

    /**
     * 分页查询用户
     *
     * @param userPageParam 查询条件
     * @return ReturnResult<Object>
     */
    @PostMapping("/pageList")
    public ReturnResult<Object> pageList(@Validated @RequestBody UserPageParam userPageParam) {
        return sysUserService.pageList(userPageParam);
    }
}
